Repository navigation
Conversation
|
Starting the rule tests ... |
Removed noise and performance metrics from rule metadata.
|
Starting the rule tests ... |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new rule has inconsistent creation and update dates and an inaccurate distinction between macOS timestamp-setting behaviors in both its description and investigation guide.
2 open issues
What changed in this PR
Adds a macOS building-block rule for timestamp changes using SetFile, complementing the existing touch timestomping detection.
Changes:
- Detects
SetFileexecutions with-dor-musing Elastic Defend process events. - Configures hourly execution and one-hour suppression by host and parent executable.
- Includes investigation guidance, integration setup instructions, and MITRE ATT&CK Timestomp mapping.
| File | Description |
|---|---|
rules_building_block/defense_evasion_timestomp_setfile.toml |
Adds the SetFile detection, suppression settings, and supporting guidance. |
Review effort: Balanced
Removed detailed investigation guide and setup instructions for timestomping using SetFile.
Updated creation and updated dates in the configuration.
bryans3c
approved these changes
Dec 1, 2026
|
|
||
| query = ''' | ||
| process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and | ||
| process.name == "SetFile" and process.args in ("-d", "-m") |
Contributor
There was a problem hiding this comment.
Suggested change
| process.name == "SetFile" and process.args in ("-d", "-m") | |
| process.name : "SetFile" and process.args in ("-d", "-m") |
Use case insensitive ":"
Updated description for defense evasion timestomp setfile. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary - What I changed
Adds a new macOS BB rule, which detects
SetFilebeing used to change a file's creation (-d) or modification (-m) timestamp.SetFileships with Xcode Command Line Tools. The existingTimestomping using Touch Commandrule (rules/cross-platform/defense_evasion_timestomp_touch.toml) only coverstouch.Test
touch /tmp/test.txtSetFile -m 01/01/1970 /tmp/test.txtSetFile -d "01/01/2020 10:00:00" /tmp/test.txt